import { defineStore } from 'pinia'
import store from "@/store"

export const useSettingStore = defineStore('setting', () => {
    // 侧边栏是否收缩
    const isShrink = ref<boolean>(false)  
      // 改变侧边栏收缩状态
    const changeSiderStatus = () => {
        isShrink.value=!isShrink.value
    }
   
    return {
        isShrink,
        changeSiderStatus
    }
})

/** 在 setup 外使用 */
export function useSettingStoreHook() {
  return useSettingStore(store)
}